Skip to content

[SYCL] the first kernel function declaration should be added with attribute #18405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: sycl
Choose a base branch
from

Conversation

dklochkov-emb
Copy link
Contributor

Docs Defining a free function kernel contains:
The property must appear on the first declaration of the function in the translation unit. Redeclarations of the function may optionally be decorated with the same property if the property argument is the same. The effect is the same regardless of whether redeclarations are so decorated.

This PR changes isFreeFunction to define if the first occurrence of kernel free function has attribute or not. New clang diagnostics was added to highlight that first occurrence does not have attribute but the next has.

@dklochkov-emb dklochkov-emb requested review from a team as code owners May 12, 2025 08:17
@dklochkov-emb dklochkov-emb marked this pull request as draft May 12, 2025 08:17
@dklochkov-emb dklochkov-emb self-assigned this May 12, 2025
@dklochkov-emb dklochkov-emb marked this pull request as ready for review May 12, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants